﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using abhishek.somnath.bidyut.library;

namespace MultipleProgs
{
    public class PropertyDemo2
    {
        public static void Main()
        {
            StudentInfo student = new StudentInfo();
            Console.Write("Enter Roll No. :");
            //student.RollNo =Convert.ToInt32(Console.ReadLine());
            student.RollNo = Int32.Parse(Console.ReadLine());
            Console.Write("Enter Name :");
            student.Name = Console.ReadLine();
            SaveStudent(student);
            ShowStudent(student);

            Console.WriteLine("Thank you!");
            Console.Read();
        }
        private static void ShowStudent(StudentInfo student)
        {
            Console.WriteLine("Roll   " + student.RollNo);
            Console.WriteLine("Name   " + student.Name);
        }
        private static void SaveStudent(StudentInfo student)
        {
            string record = student.RollNo + " " + student.Name;
            System.IO.File.WriteAllText(@"c:\Temp\student.txt",record);
        }
    }
}